package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 学校直接调剂人数控制表
 *
 * @author chenzh
 * @since 2023-07-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_school_tj_params")
@Schema(name = "EduSchoolTjParams", title = "学校直接调剂人数控制表", description = "学校直接调剂人数控制表实体类")
public class EduSchoolTjParams extends Model<EduSchoolTjParams> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "schoolTjId", title = "调剂id")
    @TableId(value = "school_tj_id", type = IdType.ASSIGN_ID)
    private String schoolTjId;

    @Schema(name = "fromSchoolId", title = "调出学校id")
    @TableField(value = "from_school_id")
    private String fromSchoolId;

    @Schema(name = "fromSchoolName", title = "调出学校名称")
    @TableField(value = "from_school_name")
    private String fromSchoolName;

    @Schema(name = "toSchoolId", title = "调入学校id")
    @TableField(value = "to_school_id")
    private String toSchoolId;

    @Schema(name = "toSchoolName", title = "调入学校名称")
    @TableField(value = "to_school_name")
    private String toSchoolName;

    @Schema(name = "year", title = "招生年度")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "tjCount", title = "调剂人数")
    @TableField(value = "tj_count")
    private Integer tjCount;

    @Schema(name = "createName", title = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", title = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", title = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", title = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "areaCode", title = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "del", title = "逻辑删除标志")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "flag", title = "是否有效 0 否 1 是")
    @TableField(value = "flag")
    private String flag;

    @Override
    public Serializable pkVal() {
        return this.schoolTjId;
    }
}
